<?php
/**
 * @Author:      lyt
 * @DateTime:  2017-05-26 16:55:19
 * @Description: 用于清理应收收回的 逻辑
 */
$api_service_path = __DIR__ . "/../../../api/";
ob_start();
require_once($api_service_path . "public/index.php");
ob_end_clean();
DB::connection()->disableQueryLog(); 



$receivable_arr=DB::select("SELECT * FROM `receivable` where verify_status=1 ");
//循环处理清洗 收款单支付记录 支付方式的金额
foreach($receivable_arr as $receivable){
	ReceivablePay::where("receivable_id",$receivable->receivable_id)->where("status",1)->update(array("amount"=>$receivable->amount));
	Log::info("收款单 ：".$receivable->receivable_id." 完毕");
}





